<div class="breadcrumbwidget">
	<ul class="skins">
        <li><a href="default" class="skin-color default"></a></li>
        <li><a href="orange" class="skin-color orange"></a></li>
        <li>&nbsp;</li>
        <li class="fixed"><a href="" class="skin-layout fixed"></a></li>
        <li class="wide"><a href="" class="skin-layout wide"></a></li>
    </ul><!--skins-->
	<ul class="breadcrumb">
        <li><a href="<?php echo $baseurl?>">Trang chủ</a> <span class="divider">/</span></li>
        <li class="active">Quản lý hoạt động Gameshow</li>
    </ul>
</div><!--breadcrumbwidget-->
<div class="pagetitle">
	<h1>Quản lý hoạt động Gameshow</h1> <span></span>
</div>
<div class="maincontent">
    <div class="contentinner content-dashboard">
        <table class="table table-bordered">
        <colgroup>
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
            <col class="con0" />
            <col class="con1" />
        </colgroup>
        <thead>
            <tr>
            	<th class="centeralign">STT</th>
                <th>Tên tài khoản</th>
                <th>Mã giao dịch</th>
                <th>Nội dung giao dịch</th>
                <th>Trạng thái</th>
                <th>Thời gian</th>
            </tr>
        </thead>
        <tbody>
        <?php if(!in_array($data, array(null, '', '0'))):?>
            <?php $stt = ((($page_current ? $page_current : 1) - 1) * $_per_page) + 1; foreach($data AS $key=>$value): ?>
                <tr>
                	<td class="centeralign"><?php echo $stt;$stt++;?></td>
                    <td><?php echo $value->username?></td>
                    <td><?php echo $value->codeTrade?></td>
                    <td><?php echo $value->content?></td>
                    <td>
                        <?php 
                            if($value->statusTrade == 1)
                            {
                                echo 'Thành công';
                            }elseif($value->statusTrade ==0){
                                echo 'Thất bại';
                            }
                        ?>
                    </td>
                    <td><?php echo $value->created?></td>
                </tr>
            <?php endforeach;?>
            </tbody>
        </table>
    
        <div class="pagination">
            <?php echo $this->pagination->create_links();?> 
        </div>
        <?php else: ?>
            </tbody>
        </table>
        <?php endif;?>
    
    </div>
</div>

<script>
    $(document).ready(function(){
       $(document).on('click', '#submit', function(){
            var search = $('#search').val();
            $.ajax({
                type: "GET",
                url: '<?php echo $baseurl?>manage/trade/search',
                data: ({keyword : search}),
                success: function(data){
                    $('tbody').html(data);
                }
                
            });
            return false;
       });
    });
</script>